import { request, config } from 'utils'

const { api } = config

const { reportList, reportGet, reportBrief, reportAdd, reportDel, reportXML, reportDownXML } = api

export async function query (params) {
  return request({
    url: reportList,
    method: 'put',
    data: params,
  })
}
export async function get (params) {
  return request({
    url: reportGet,
    method: 'put',
    data: params,
  })
}
export async function brief (params) {
  return request({
    url: reportBrief,
    method: 'put',
    data: params,
  })
}
export async function create (params) {
  return request({
    url: reportAdd,
    method: 'post',
    data: params,
  })
}
export async function remove (params) {
  return request({
    url: reportDel,
    method: 'delete',
    data: params,
  })
}
export async function genarationXML (params) {
  return request({
    url: reportXML,
    method: 'post',
    data: params,
  })
}
// 生成临时XML文件
export async function downXMLFile (params) {
  return request({
    url: reportDownXML,
    method: 'post',
    data: params,
  })
}
